package cn.tedu.design;

/**
 * @Author 金帮嘉诚
 * @Date 2021-06-11 周五 20:22
 */
/*本类用于设计老师类，要求面向抽象编程--后天抽象形成的结果，通过提取共性方法，属性*/
public class DesignTeacher1 {
    public static void main(String[] args) {
        CGBTeacher c = new CGBTeacher();
        c.ready();
        c.teach();
        ACTTeacher a = new ACTTeacher();
        a.ready();
        a.teach();
        SCDTeacher s = new SCDTeacher();
        s.ready();
        s.teach();
    }
}

abstract class Teacher1 {
    int id;
    String name;

    public abstract void ready();

    public abstract void teach();
}

class CGBTeacher extends Teacher1 {
    @Override
    public void ready() {
        System.out.println("正在备课...培优");
    }

    @Override
    public void teach() {
        System.out.println("正在讲课...培优");

    }
}

class ACTTeacher extends Teacher1 {
    @Override
    public void ready() {
        System.out.println("正在备课...加强");

    }

    @Override
    public void teach() {
        System.out.println("正在讲课...加强");

    }
}

class SCDTeacher extends Teacher1 {
    @Override
    public void ready() {
        System.out.println("正在备课...Hadoop");

    }

    @Override
    public void teach() {
        System.out.println("正在讲课...Hadoop");

    }
}